<?php

function BotAngriff ($Bot, $BotPlanet) {
        global $db;


$BotUser = uniqueuery("SELECT * FROM ".PLANETS." WHERE id='.BotPlanet['id'].'");

$flugzeit = 900; 
$start_time = time()+$flugzeit;
                            
$end_time = $start_time + $flugzeit;
                               
$amount = 16000;
                             
$QryInsertFleet  = "INSERT INTO ".FLEETS." SET ";
$QryInsertFleet .= "`fleet_owner` = '" . $pirat[0] . "', ";
$QryInsertFleet .= "`fleet_mission` = '1', ";
$QryInsertFleet .= "`fleet_amount` = '". $amount ."', ";
$QryInsertFleet .= "`fleet_array` = '". $fleetarray[0] ."', ";
$QryInsertFleet .= "`fleet_end_stay` = '0', ";
$QryInsertFleet .= "`fleet_start_time` = '". $start_time ."', ";
$QryInsertFleet .= "`fleet_start_galaxy` = '" . $owner['galaxy'] . "', ";
$QryInsertFleet .= "`fleet_start_system` = '" . $owner['system'] . "', ";
$QryInsertFleet .= "`fleet_start_planet` = '" . $owner['planet'] . "', ";
$QryInsertFleet .= "`fleet_start_type` = '1', ";
$QryInsertFleet .= "`fleet_end_time` = '". $end_time ."', ";
$QryInsertFleet .= "`fleet_end_galaxy` = '". $FleetRow['fleet_start_galaxy'] ."', ";
$QryInsertFleet .= "`fleet_end_system` = '". $FleetRow['fleet_start_system'] ."', ";
$QryInsertFleet .= "`fleet_end_planet` = '". $FleetRow['fleet_start_planet'] ."', ";
$QryInsertFleet .= "`fleet_end_type` = '". $FleetRow['fleet_start_type'] ."', ";
$QryInsertFleet .= "`fleet_resource_metal` = '0', ";
$QryInsertFleet .= "`fleet_resource_crystal` = '0', ";
$QryInsertFleet .= "`fleet_resource_deuterium` = '0', ";
$QryInsertFleet .= "`fleet_resource_appolonium` = '0', ";
$QryInsertFleet .= "`fleet_target_owner` = '". $FleetRow['fleet_owner'] ."', ";
$QryInsertFleet .= "`fleet_group` = '0', ";
$QryinsertFleet .= "`fleet_mess` = '1' ";
$QryInsertFleet .= "`start_time` = '". time() ."';";

$db->query($QryInsertFleet);

}

?>